{template 'common/header'}
<ul class="nav nav-tabs">
		<li class="active"><a href="{php echo $this->createWebUrl('houselease', array('op'=>'list'));}">管理</a></li>
	</ul>
	<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="" method="post" class="form-horizontal" role="form">
			{if !$user}
				<div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 control-label">选择小区</label>
                    <div class="col-sm-3 col-md-3 col-lg-3 col-xs-3">
                        <select name="regionid" class="form-control">
                                {loop $regions $region}
                                <option value="{$region['id']}" {if $region['id']==$_GPC[ 'regionid']} selected{/if}>{$region['title']}</option>
                                {/loop}
                        </select>
                    </div>
                </div>
            {/if}
				<div class="form-group">
					<label class="col-xs-12 col-sm-2 col-md-2 control-label">租赁分类</label>
					<div class="col-sm-3 col-md-3 col-lg-3 col-xs-3">
						<select class="form-control" id="cate_2" name="category">

							
							<option value="1" {if  $_GPC['category'] == 1} selected="selected"{/if}>出租</option>
							<option value="2" {if  $_GPC['category'] == 2} selected="selected"{/if}>求租</option>
							<option value="3" {if  $_GPC['category'] == 3} selected="selected"{/if}>出售</option>
							<option value="4" {if  $_GPC['category'] == 4} selected="selected"{/if}>求购</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-2 col-md-2 control-label">发布日期</label>
					<div class="col-sm-8 col-md-8 col-lg-8 col-xs-12">
						{php echo tpl_form_field_daterange('birth', array('starttime' => date('Y-m-d',empty($starttime) ? TIMESTAMP : $starttime),'endtime' => date('Y-m-d',empty($endtime) ? TIMESTAMP : $endtime)));}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-2 col-md-2 control-label">状态</label>
					<div class="col-sm-8 col-md-8 col-lg-8 col-xs-12">
						<label for="ipt_status1" class="radio-inline">
							<input name="status" id="ipt_status1" type="radio" value="0" {if empty($_GPC['status'])}checked='checked'{/if} />未成交
						</label>
						<label for="ipt_status2" class="radio-inline">
							<input name="status" id="ipt_status2" type="radio" value="1" {if $_GPC['status'] == 1}checked='checked'{/if} />已成交
						</label>
					</div>
				</div>
				<div class="form-group">
					<div class="pull-right col-xs-12 col-sm-2 col-md-2 col-lg-2">
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div style="padding:15px;">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>

					<th style="width:10%;">姓名</th>
					<th style="width:12%;">手机</th>
					<th style="width:15%;">所属小区</th>
					<th style="width:15%;">发布时间</th>
					<th style="width:8%;">状态</th>
					<th style="min-width:60px; width:50%;">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $item}
				<tr>
					<td>{$item['realname']}</td>
					<td>{$item['mobile']}</td>
					<td>{$item['city']}{$item['dist']}{$item['title']}</td>
					<td>{php echo date('Y-m-d H:i', $item[createtime]);}</td>
					<td>{if $item['status'] ==1 }<span class="label label-success">已成交</span>{/if}{if $item['status'] == 0 }<span class="label label-info">未成交</span>{/if}{if $item['status'] == 2 }<span class="label label-error">已取消</span>{/if}</td>
					<td>
						<span>
							<a  class="btn btn-default btn-sm" href="{php echo $this->createWebUrl('houselease',array('op'=>'add','id'=>$item['id']));}">查看</a>
						</span>
						<span>
							<a  class="btn btn-default btn-sm" onclick="return confirm('删除操作不可恢复，确认吗？')" href="{php echo $this->createWebUrl('houselease',array('op'=>'delete','id'=>$item['id']));}">删除</a>
						</span>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		{$pager}
	</div>

{template 'common/footer'}